Skip to content

[8.x](backport #40885) libbeat: improve BenchmarkExecHttpRequest with multiple sizes#41062

Merged
mauri870 merged 1 commit into8.xfrom
mergify/bp/8.x/pr-40885
Oct 1, 2024
Merged

[8.x](backport #40885) libbeat: improve BenchmarkExecHttpRequest with multiple sizes#41062
mauri870 merged 1 commit into8.xfrom
mergify/bp/8.x/pr-40885

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Oct 1, 2024

Proposed commit message

This benchmark uses a hardcoded Hello World response. In a real world scenario responses will range in size, specifically for _bulk responses. Updated the benchmark to consider different sizes when benchmarking this function.

go test -benchmem -run=^$ -tags integration,unit -bench ^BenchmarkExecHTTPRequest$ github.com/elastic/beats/v7/libbeat/esleg/eslegclient -v -count=1

goos: linux
goarch: amd64
pkg: github.com/elastic/beats/v7/libbeat/esleg/eslegclient
cpu: Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz
BenchmarkExecHTTPRequest
BenchmarkExecHTTPRequest/size:_100
BenchmarkExecHTTPRequest/size:_100/unknown_length
BenchmarkExecHTTPRequest/size:_100/unknown_length-32              468573              2295 ns/op             976 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_100/known_length
BenchmarkExecHTTPRequest/size:_100/known_length-32                479560              2313 ns/op             976 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_10240
BenchmarkExecHTTPRequest/size:_10240/unknown_length
BenchmarkExecHTTPRequest/size:_10240/unknown_length-32            407080              2770 ns/op             976 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_10240/known_length
BenchmarkExecHTTPRequest/size:_10240/known_length-32              400564              2773 ns/op             976 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_102400
BenchmarkExecHTTPRequest/size:_102400/unknown_length
BenchmarkExecHTTPRequest/size:_102400/unknown_length-32            97029             10625 ns/op             977 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_102400/known_length
BenchmarkExecHTTPRequest/size:_102400/known_length-32             110724             10744 ns/op             976 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_1048576
BenchmarkExecHTTPRequest/size:_1048576/unknown_length
BenchmarkExecHTTPRequest/size:_1048576/unknown_length-32            4808            241032 ns/op            1194 B/op         10 allocs/op
BenchmarkExecHTTPRequest/size:_1048576/known_length
BenchmarkExecHTTPRequest/size:_1048576/known_length-32              4701            239657 ns/op            1199 B/op         10 allocs/op

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

This benchmark uses a hardcoded Hello World response. In a real world scenario
responses will range in size, specifically for _bulk responses. Updated the
benchmark to consider different sizes when benchmarking this function.

(cherry picked from commit ee157de)
@mergify mergify bot requested a review from a team as a code owner October 1, 2024 15:03
@mergify mergify bot added the backport label Oct 1, 2024
@mergify mergify bot removed the request for review from a team October 1, 2024 15:03
@mergify mergify bot requested review from VihasMakwana and leehinman October 1, 2024 15:03
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 1, 2024
@botelastic
Copy link

botelastic bot commented Oct 1, 2024

This pull request doesn't have a Team:<team> label.

@mauri870 mauri870 self-requested a review October 1, 2024 17:04
@mauri870 mauri870 merged commit 803e672 into 8.x Oct 1, 2024
@mauri870 mauri870 deleted the mergify/bp/8.x/pr-40885 branch October 1, 2024 17:04
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport needs_team Indicates that the issue/PR needs a Team:* label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant